provide startup time to ready log point and associated benchmark#22581
provide startup time to ready log point and associated benchmark#22581tilladam wants to merge 1 commit into
Conversation
7e73760 to
b2b142a
Compare
|
I'm sorry but I don't think this is worth the extra complexity when we already have a |
|
Thanks for looking at this. The prime-caches subcommand is great for testing the raw database caching, but it bypasses the main_loop completely. It doesn't run the actual LSP server, the VFS progress sync, or the flycheck background tasks. I can be convinced that the benchmark doesn't add a ton of value, since regressions are somewhat more likely to come from the interaction of all those things, rather than the code path the benchmark covers, but I'd argue the log point still makes it quite a bit easier to get timing measurements in a significant spot when profiling the launch experience more holistically, for very modest added complexity. |
|
It still loads all files into the VFS and runs Cargo. We don't have much more than that. But since you disagree, let's ask: @rust-lang/rust-analyzer does someone do want this? |
|
Yea I don't think this is too useful either, having an fino log when done with workspace loading etc seems fine to me though, but anything other than that is unnecessary if you ask me |
|
So you're saying keep the log point and nix the benchmark? I'm ok with that. |
|
Yea but without the time tracking, just have a log for startup, and a log for whenever we load a workspace, the default logger has timestamps already after all |
b2b142a to
928bc46
Compare
Add a simple info log statement when cache priming finishes on startup. Disclosure: Anthropic Claude 3.5 Flash assisted with this change.
928bc46 to
ac8291b
Compare
While profiling rust-analyzer startup and workspace initialization I found it useful to get the timing of completed cache priming, when the workspace is loaded and indexed. This patch provides that log point and a benchmark to track it over time.
Disclosure: Anthropic Claude 4.7 built the benchmark, a supposedly qualified human reviewed it and takes responsibility for it.